import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data,
  })
}

export function register(data) {
  return request({
    url: '/register',
    method: 'post',
    data
  })
}

export function getUser(id) {
  return request({
    url: '/user',
    method: 'get',
    params: { id }
  })
}

export function updateUser(data) {
  return request({
    url: '/user',
    method: 'put',
    data
  })
}


export function getInfo(token) {
  return Promise.resolve()
}

export function logout() {
  return Promise.resolve()
}
